import React,{useState} from 'react';
import {Button} from "antd";
import {CodeBlock} from "./code/CodeBlock";


export const UseLayOutEffectHooks = function () {

    const [num,setNum] = useState(0);



    return (
        <>
            <div>
                <CodeBlock language={'JavaScript'} code={`console.log('hello world')`}/>
                <Button onClick={()=>{setNum(num+1)}} type={'primary'}>+1</Button>
            </div>
        </>
    )

};

